{extend name="pub/base" /}
{block name="title"}
<title>轮播管理</title>
{/block}

{block name="body"}
<section class="Hui-admin-article">
    <nav class="breadcrumb" style="background-color:#fff;padding: 0 24px"><i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span>
        轮播管理
        <span class="c-gray en">&gt;</span>
        轮播列表
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <div class="Hui-admin-content clearfix">
        <div class="panel mt-20">
            <div class="panel-body">
                <div class="clearfix">
				<span class="f-l">
                    <a href="javascript:;" onclick="delAll('请选择要删除的轮播','banners')" class="btn btn-danger radius"><i
                            class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
				<a class="btn btn-primary radius" onclick="editCreate('轮播新增','{:url(\'create\')}')">
                    <i class="Hui-iconfont">&#xe600;</i> 添加轮播
                </a>
				</span>
                    <span class="f-r">共有数据：<strong>{$count}</strong> 条</span>
                </div>
                <div class="mt-20 clearfix">
                    <table class="table table-border table-bordered table-bg table-hover table-sort">
                        <thead>
                        <tr class="text-c">
                            <th><input id="cbx" type="checkbox" value=""></th>
                            <th>ID</th>
                            <th>标题</th>
                            <th>封面图</th>
                            <th>所属漫画</th>
                            <th>排序</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="banners" id="vo"}
                        <tr class="text-c">
                            <td><input data-val="{$vo.id}" class="cbx" type="checkbox" value=""></td>
                            <td>{$vo.id}</td>
                            <td>{$vo.title}</td>
                            <td>
                                <img width="20%" class="picture-thumb" src="/static/upload/{$vo.pic_name}">
                            </td>
                            <td>
                                {$vo.book.book_name}
                            </td>
                            <td>{$vo.banner_order}</td>
                            <td class="f-14 td-manage">
                                <a style="text-decoration:none" class="ml-5"  onclick="editCreate('轮播编辑','{:url(\'banners/edit\',[\'id\' => $vo.id])}')">
                                    <i class="Hui-iconfont">&#xe6df;</i>
                                </a>
                                <a style="text-decoration:none" class="ml-5" onclick="del(this,{$vo.id})"
                                   href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                    {$banners|raw}
                </div>
            </div>
        </div>
    </div>
</section>

{/block}